<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <script src="../js/jquery-3.4.1.min.js"></script>
    </head>
    <body>
        <img src="../DOM/img/slide-1.jpg" alt="" id="img1"> 

        <script>
            //设置属性
            $("#img1").attr("name", "img")
        </script>
    </body>
</html>